<?php

$str ="sdf@q-q.com";

$preg = "/^\w+@([\da-z]{1,2}|[\da-z][\da-z-]+[\da-z])(\.[a-z]{2,})+$/";

$c = preg_match($preg,$str);

// var_dump($c);

$str ="445281198611241867";
$str ="445281197810231899";

$str ="445281198609312344";

// 1900 2018  01  12 01  10 20  31

$preg = "/^[^0]\d{5}(19\d{2}|20(0\d|1[0-8]))(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[0-1])\d{3}[\dx]$/i";

$c = preg_match($preg,$str);

// var_dump($c);


$str ="https://q-q.com.cn/";

// 1900 2018  01  12 01  10 20  31

$preg = "/^(http|https):\/\/([\da-z]{1,2}|[\da-z][\da-z-]+[\da-z])(\.[a-z]{2,})+\/?/";

$c = preg_match($preg,$str);

var_dump($c);


$data = file_get_contents("https://www.lagou.com/");

$preg = "/data-salary=\"(.+?)\".+?data-company=\"(.+?)\".+?data-positionname=\"(.+?)\"/s";


$c = preg_match_all($preg,$data,$out);


var_dump($c,$out);


   // data-salary="10k-20k"
   //  data-company="瑞赛网络"
   //  data-positionname="前端开发工程师"